Integrand size = 40, antiderivative size = 136 \[ \int \frac {\cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=-\frac {(3 B-C) x}{a^3}+\frac {2 (36 B-11 C) \sin (c+d x)}{15 a^3 d}-\frac {(B-C) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(9 B-4 C) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {(3 B-C) \sin (c+d x)}{d \left (a^3+a^3 \sec (c+d x)\right )} \]
-(3*B-C)*x/a^3+2/15*(36*B-11*C)*sin(d*x+c)/a^3/d-1/5*(B-C)*sin(d*x+c)/d/(a +a*sec(d*x+c))^3-1/15*(9*B-4*C)*sin(d*x+c)/a/d/(a+a*sec(d*x+c))^2-(3*B-C)* sin(d*x+c)/d/(a^3+a^3*sec(d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(365\) vs. \(2(136)=272\).
Time = 1.61 (sec) , antiderivative size = 365, normalized size of antiderivative = 2.68 \[ \int \frac {\cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \left (-300 (3 B-C) d x \cos \left (\frac {d x}{2}\right )-300 (3 B-C) d x \cos \left (c+\frac {d x}{2}\right )-450 B d x \cos \left (c+\frac {3 d x}{2}\right )+150 C d x \cos \left (c+\frac {3 d x}{2}\right )-450 B d x \cos \left (2 c+\frac {3 d x}{2}\right )+150 C d x \cos \left (2 c+\frac {3 d x}{2}\right )-90 B d x \cos \left (2 c+\frac {5 d x}{2}\right )+30 C d x \cos \left (2 c+\frac {5 d x}{2}\right )-90 B d x \cos \left (3 c+\frac {5 d x}{2}\right )+30 C d x \cos \left (3 c+\frac {5 d x}{2}\right )+1755 B \sin \left (\frac {d x}{2}\right )-740 C \sin \left (\frac {d x}{2}\right )-1125 B \sin \left (c+\frac {d x}{2}\right )+540 C \sin \left (c+\frac {d x}{2}\right )+1215 B \sin \left (c+\frac {3 d x}{2}\right )-460 C \sin \left (c+\frac {3 d x}{2}\right )-225 B \sin \left (2 c+\frac {3 d x}{2}\right )+180 C \sin \left (2 c+\frac {3 d x}{2}\right )+363 B \sin \left (2 c+\frac {5 d x}{2}\right )-128 C \sin \left (2 c+\frac {5 d x}{2}\right )+75 B \sin \left (3 c+\frac {5 d x}{2}\right )+15 B \sin \left (3 c+\frac {7 d x}{2}\right )+15 B \sin \left (4 c+\frac {7 d x}{2}\right )\right )}{120 a^3 d (1+\cos (c+d x))^3} \]
(Cos[(c + d*x)/2]*Sec[c/2]*(-300*(3*B - C)*d*x*Cos[(d*x)/2] - 300*(3*B - C )*d*x*Cos[c + (d*x)/2] - 450*B*d*x*Cos[c + (3*d*x)/2] + 150*C*d*x*Cos[c + (3*d*x)/2] - 450*B*d*x*Cos[2*c + (3*d*x)/2] + 150*C*d*x*Cos[2*c + (3*d*x)/ 2] - 90*B*d*x*Cos[2*c + (5*d*x)/2] + 30*C*d*x*Cos[2*c + (5*d*x)/2] - 90*B* d*x*Cos[3*c + (5*d*x)/2] + 30*C*d*x*Cos[3*c + (5*d*x)/2] + 1755*B*Sin[(d*x )/2] - 740*C*Sin[(d*x)/2] - 1125*B*Sin[c + (d*x)/2] + 540*C*Sin[c + (d*x)/ 2] + 1215*B*Sin[c + (3*d*x)/2] - 460*C*Sin[c + (3*d*x)/2] - 225*B*Sin[2*c + (3*d*x)/2] + 180*C*Sin[2*c + (3*d*x)/2] + 363*B*Sin[2*c + (5*d*x)/2] - 1 28*C*Sin[2*c + (5*d*x)/2] + 75*B*Sin[3*c + (5*d*x)/2] + 15*B*Sin[3*c + (7* d*x)/2] + 15*B*Sin[4*c + (7*d*x)/2]))/(120*a^3*d*(1 + Cos[c + d*x])^3)
Time = 1.08 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.12, number of steps used = 13, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.325, Rules used = {3042, 4560, 3042, 4508, 3042, 4508, 3042, 4508, 3042, 4274, 24, 3042, 3117}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a \sec (c+d x)+a)^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3}dx\) |
\(\Big \downarrow \) 4560 |
\(\displaystyle \int \frac {\cos (c+d x) (B+C \sec (c+d x))}{(a \sec (c+d x)+a)^3}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {B+C \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3}dx\) |
\(\Big \downarrow \) 4508 |
\(\displaystyle \frac {\int \frac {\cos (c+d x) (a (6 B-C)-3 a (B-C) \sec (c+d x))}{(\sec (c+d x) a+a)^2}dx}{5 a^2}-\frac {(B-C) \sin (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a (6 B-C)-3 a (B-C) \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx}{5 a^2}-\frac {(B-C) \sin (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 4508 |
\(\displaystyle \frac {\frac {\int \frac {\cos (c+d x) \left (a^2 (27 B-7 C)-2 a^2 (9 B-4 C) \sec (c+d x)\right )}{\sec (c+d x) a+a}dx}{3 a^2}-\frac {a (9 B-4 C) \sin (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \sin (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {a^2 (27 B-7 C)-2 a^2 (9 B-4 C) \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )}dx}{3 a^2}-\frac {a (9 B-4 C) \sin (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \sin (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 4508 |
\(\displaystyle \frac {\frac {\frac {\int \cos (c+d x) \left (2 a^3 (36 B-11 C)-15 a^3 (3 B-C) \sec (c+d x)\right )dx}{a^2}-\frac {15 a^2 (3 B-C) \sin (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (9 B-4 C) \sin (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \sin (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\int \frac {2 a^3 (36 B-11 C)-15 a^3 (3 B-C) \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2}-\frac {15 a^2 (3 B-C) \sin (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (9 B-4 C) \sin (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \sin (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle \frac {\frac {\frac {2 a^3 (36 B-11 C) \int \cos (c+d x)dx-15 a^3 (3 B-C) \int 1dx}{a^2}-\frac {15 a^2 (3 B-C) \sin (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (9 B-4 C) \sin (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \sin (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {\frac {2 a^3 (36 B-11 C) \int \cos (c+d x)dx-15 a^3 x (3 B-C)}{a^2}-\frac {15 a^2 (3 B-C) \sin (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (9 B-4 C) \sin (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \sin (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {2 a^3 (36 B-11 C) \int \sin \left (c+d x+\frac {\pi }{2}\right )dx-15 a^3 x (3 B-C)}{a^2}-\frac {15 a^2 (3 B-C) \sin (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (9 B-4 C) \sin (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \sin (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle \frac {\frac {\frac {\frac {2 a^3 (36 B-11 C) \sin (c+d x)}{d}-15 a^3 x (3 B-C)}{a^2}-\frac {15 a^2 (3 B-C) \sin (c+d x)}{d (a \sec (c+d x)+a)}}{3 a^2}-\frac {a (9 B-4 C) \sin (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(B-C) \sin (c+d x)}{5 d (a \sec (c+d x)+a)^3}\) |
-1/5*((B - C)*Sin[c + d*x])/(d*(a + a*Sec[c + d*x])^3) + (-1/3*(a*(9*B - 4 *C)*Sin[c + d*x])/(d*(a + a*Sec[c + d*x])^2) + ((-15*a^2*(3*B - C)*Sin[c + d*x])/(d*(a + a*Sec[c + d*x])) + (-15*a^3*(3*B - C)*x + (2*a^3*(36*B - 11 *C)*Sin[c + d*x])/d)/a^2)/(3*a^2))/(5*a^2)
3.4.54.3.1 Defintions of rubi rules used
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-(A*b - a*B))*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(b*f*(2*m + 1))), x] - Simp[1/(a^2*(2*m + 1)) Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Cs c[e + f*x])^n*Simp[b*B*n - a*A*(2*m + n + 1) + (A*b - a*B)*(m + n + 1)*Csc[ e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[A*b - a*B , 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0]
Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_. )*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.) *(x_)]*(d_.))^(n_.), x_Symbol] :> Simp[1/b^2 Int[(a + b*Csc[e + f*x])^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Time = 0.24 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.65
method | result | size |
parallelrisch | \(\frac {729 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (\frac {26 B}{81}-\frac {64 C}{729}\right ) \cos \left (2 d x +2 c \right )+\frac {5 B \cos \left (3 d x +3 c \right )}{243}+\left (B -\frac {68 C}{243}\right ) \cos \left (d x +c \right )+\frac {58 B}{81}-\frac {152 C}{729}\right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-720 x d \left (B -\frac {C}{3}\right )}{240 a^{3} d}\) | \(89\) |
derivativedivides | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} B}{5}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} C}{5}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B +\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}+17 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {8 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-8 \left (3 B -C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(136\) |
default | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} B}{5}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} C}{5}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B +\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}+17 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {8 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-8 \left (3 B -C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(136\) |
risch | \(-\frac {3 B x}{a^{3}}+\frac {x C}{a^{3}}-\frac {i B \,{\mathrm e}^{i \left (d x +c \right )}}{2 a^{3} d}+\frac {i B \,{\mathrm e}^{-i \left (d x +c \right )}}{2 a^{3} d}+\frac {2 i \left (90 B \,{\mathrm e}^{4 i \left (d x +c \right )}-45 C \,{\mathrm e}^{4 i \left (d x +c \right )}+300 B \,{\mathrm e}^{3 i \left (d x +c \right )}-135 C \,{\mathrm e}^{3 i \left (d x +c \right )}+420 B \,{\mathrm e}^{2 i \left (d x +c \right )}-185 C \,{\mathrm e}^{2 i \left (d x +c \right )}+270 B \,{\mathrm e}^{i \left (d x +c \right )}-115 C \,{\mathrm e}^{i \left (d x +c \right )}+72 B -32 C \right )}{15 d \,a^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{5}}\) | \(178\) |
norman | \(\frac {\frac {\left (3 B -C \right ) x}{a}+\frac {\left (3 B -C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{a}+\frac {\left (B -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{20 a d}-\frac {\left (3 B -C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{a}-\frac {\left (3 B -C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{a}-\frac {\left (25 B -7 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}-\frac {\left (27 B -17 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{60 a d}-\frac {\left (45 B -17 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 a d}+\frac {\left (111 B -41 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{30 a d}+\frac {\left (201 B -61 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{30 a d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) a^{2}}\) | \(271\) |
1/240*(729*tan(1/2*d*x+1/2*c)*((26/81*B-64/729*C)*cos(2*d*x+2*c)+5/243*B*c os(3*d*x+3*c)+(B-68/243*C)*cos(d*x+c)+58/81*B-152/729*C)*sec(1/2*d*x+1/2*c )^4-720*x*d*(B-1/3*C))/a^3/d
Time = 0.25 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.27 \[ \int \frac {\cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=-\frac {15 \, {\left (3 \, B - C\right )} d x \cos \left (d x + c\right )^{3} + 45 \, {\left (3 \, B - C\right )} d x \cos \left (d x + c\right )^{2} + 45 \, {\left (3 \, B - C\right )} d x \cos \left (d x + c\right ) + 15 \, {\left (3 \, B - C\right )} d x - {\left (15 \, B \cos \left (d x + c\right )^{3} + {\left (117 \, B - 32 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (57 \, B - 17 \, C\right )} \cos \left (d x + c\right ) + 72 \, B - 22 \, C\right )} \sin \left (d x + c\right )}{15 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \]
integrate(cos(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^3,x, algorithm="fricas")
-1/15*(15*(3*B - C)*d*x*cos(d*x + c)^3 + 45*(3*B - C)*d*x*cos(d*x + c)^2 + 45*(3*B - C)*d*x*cos(d*x + c) + 15*(3*B - C)*d*x - (15*B*cos(d*x + c)^3 + (117*B - 32*C)*cos(d*x + c)^2 + 3*(57*B - 17*C)*cos(d*x + c) + 72*B - 22* C)*sin(d*x + c))/(a^3*d*cos(d*x + c)^3 + 3*a^3*d*cos(d*x + c)^2 + 3*a^3*d* cos(d*x + c) + a^3*d)
\[ \int \frac {\cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\int \frac {B \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \cos ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \]
(Integral(B*cos(c + d*x)**2*sec(c + d*x)/(sec(c + d*x)**3 + 3*sec(c + d*x) **2 + 3*sec(c + d*x) + 1), x) + Integral(C*cos(c + d*x)**2*sec(c + d*x)**2 /(sec(c + d*x)**3 + 3*sec(c + d*x)**2 + 3*sec(c + d*x) + 1), x))/a**3
Time = 0.33 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.70 \[ \int \frac {\cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {3 \, B {\left (\frac {40 \, \sin \left (d x + c\right )}{{\left (a^{3} + \frac {a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} + \frac {\frac {85 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {\sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {120 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )} - C {\left (\frac {\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {120 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )}}{60 \, d} \]
integrate(cos(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^3,x, algorithm="maxima")
1/60*(3*B*(40*sin(d*x + c)/((a^3 + a^3*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 )*(cos(d*x + c) + 1)) + (85*sin(d*x + c)/(cos(d*x + c) + 1) - 10*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/a^3 - 12 0*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^3) - C*((105*sin(d*x + c)/(cos (d*x + c) + 1) - 20*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 3*sin(d*x + c)^5 /(cos(d*x + c) + 1)^5)/a^3 - 120*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a ^3))/d
Time = 0.31 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.15 \[ \int \frac {\cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=-\frac {\frac {60 \, {\left (d x + c\right )} {\left (3 \, B - C\right )}}{a^{3}} - \frac {120 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a^{3}} - \frac {3 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 30 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 20 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 255 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 105 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{15}}}{60 \, d} \]
-1/60*(60*(d*x + c)*(3*B - C)/a^3 - 120*B*tan(1/2*d*x + 1/2*c)/((tan(1/2*d *x + 1/2*c)^2 + 1)*a^3) - (3*B*a^12*tan(1/2*d*x + 1/2*c)^5 - 3*C*a^12*tan( 1/2*d*x + 1/2*c)^5 - 30*B*a^12*tan(1/2*d*x + 1/2*c)^3 + 20*C*a^12*tan(1/2* d*x + 1/2*c)^3 + 255*B*a^12*tan(1/2*d*x + 1/2*c) - 105*C*a^12*tan(1/2*d*x + 1/2*c))/a^15)/d
Time = 15.89 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.14 \[ \int \frac {\cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,B}{2\,a^3}+\frac {3\,\left (B-C\right )}{4\,a^3}+\frac {4\,B-2\,C}{2\,a^3}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {B-C}{6\,a^3}+\frac {4\,B-2\,C}{12\,a^3}\right )}{d}-\frac {x\,\left (3\,B-C\right )}{a^3}+\frac {2\,B\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^3\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (B-C\right )}{20\,a^3\,d} \]